#include "Logger.h"
#include "OnTestMsg.h"
#include "ReceiverEngine.h"
#include "SenderEngine.h"
#include "ServerApplication.h"
class TestApp : public ServerApplication
{
  public:
    /// 构造所有的引擎
    virtual void init() override
    {
        auto sender    = std::make_shared<SenderEngine>();
        auto receiver2 = std::make_shared<ReceiverEngine>(2);
        auto receiver3 = std::make_shared<ReceiverEngine>(3);
        auto receiver4 = std::make_shared<ReceiverEngine>(4);
        auto receiver5 = std::make_shared<ReceiverEngine>(5);
        auto receiver6 = std::make_shared<ReceiverEngine>(6);

        addEventengine(sender);
        addEventengine(receiver2);
        addEventengine(receiver3);
        addEventengine(receiver4);
        addEventengine(receiver5);
        addEventengine(receiver6);
    }
};

XNCC_APP_MAIN(TestApp);